package com.pj.wisdomlogistics.mvp.presenter;


import com.pj.wisdomlogistics.entity.MyApplySimpleInfo;
import com.pj.wisdomlogistics.mvp.contract.MyTransactContract;
import com.pj.wisdomlogistics.mvp.frame.ActivityPresenter;
import com.pj.wisdomlogistics.mvp.model.MyTransactModel;
import com.pj.wisdomlogistics.rx.FilterSubscriber;


public class MyTransactPresenter extends ActivityPresenter<MyTransactModel,MyTransactContract.View> implements MyTransactContract.Presenter{
    public static final String TAG = "MyTransactPresenter";

    @Override
    public void myTodo(String userID, int applyType , int timeType, int state, int pageIndex, int pageNumber) {
        addSubscription(getModel().myTodo(userID, applyType , timeType, state, pageIndex, pageNumber), new FilterSubscriber<MyApplySimpleInfo>() {
            @Override
            public void onNext(MyApplySimpleInfo mInfo) {
                getView().showSuccess(mInfo);
            }

            @Override
            public void onError(int errorCode, String errorMsg) {
                getView().showError(errorMsg);
            }

        });
    }
}
